<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="cl.falabella.cmr.dao.RegionDAO" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
        <title>index</title>
    </head>
    <body>
        <h1>Regiones de Chile</h1>
        
        <table border="1">
            <tr>
                <th>Numeral</th>
                <th>Nombre</th>
                <th>Capital</th>
            </tr>
        
        <%
            List<RegionDAO> regiones = RegionDAO.getRegiones();
            for (RegionDAO region : regiones) {
        %>
            <tr>
                <td><%=region.getNumeral()%></td>
                <td><%=region.getNombre()%></td>
                <td><%=region.getCapital()%></td>
            </tr>
        <% } %>
        </table>
    </body>
</html>